Conversation
size-limit report 📦
|
.gitignore
Outdated
| src/**/*.js | ||
| src/**/*.d.ts | ||
| src/**/*.d.ts.map |
There was a problem hiding this comment.
Why? I don't think we have any files like these under src/
There was a problem hiding this comment.
I think I ran tsc to check for build and saw all of those files in the diff. now thinking updating tsconfig to include outDir would be be better
There was a problem hiding this comment.
You just want to run tsc to check if types are alright, but don't want to run the whole build script?
Do npx tsc --noEmit then, no need to emit anything, no need for outDir
There was a problem hiding this comment.
you are right, no idea what I was thinking 🤦
src/methods/delta/buildDeltaOrder.ts
Outdated
| function applySlippage( | ||
| amount: string, | ||
| slippageBps: number, | ||
| increase: boolean | ||
| ): string { |
There was a problem hiding this comment.
We usually prefer object as input, more readable that way
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
This reverts commit d80d459.

Note
Medium Risk
Changes Delta order amount computation by introducing a new
slippageparameter that auto-derivessrcAmount/destAmountand infers side, which could affect order quoting/execution if callers rely on the old explicit-amount behavior. Test and snapshot removals reduce coverage for limit/NFT orders, increasing regression risk outside Delta.Overview
Adds first-class slippage handling to Delta order construction:
buildDeltaOrdernow acceptsslippage(in bps) and will auto-compute the missing amount fromdeltaPrice(SELL computesdestAmountminimum; BUY computessrcAmountmaximum) while inferringsidewhen slippage is used.Updates
examples/delta.tsto passslippageinstead of manually calculatingdestAmount, adds unit tests covering BUY/SELL slippage behavior, and adjusts snapshots. Separately removes the large Jest snapshot files and test suites for limit orders/NFT orders (plus related test ABIs/bytecode/helpers), and updates remaining snapshots to reflect current quote/tx fields (e.g.,contractMethod,partnerFee).Written by Cursor Bugbot for commit fc8f6ec. This will update automatically on new commits. Configure here.